/*-
 * Copyright (c) 2009-2010 David Forsythe.
 * See LICENSE file for license details.
 */

#ifndef __PKG_MANIFEST_PARSE_PLIST_H__
#define __PKG_MANIFEST_PARSE_PLIST_H__

#include "internal.h"

/* Meta entries. */
#define FBSD_METANAME_COMMENT "COMMENT"
#define FBSD_METANAME_CONTENTS "CONTENTS"
#define FBSD_METANAME_DESCRIPTION "DESC"
#define FBSD_METANAME_DISPLAY "DISPLAY"
#define FBSD_METANAME_REQUIRED_BY "REQUIRED_BY"
#define FBSD_METANAME_REQUIRE "REQUIRE"
#define FBSD_METANAME_PRE_INSTALL "INSTALL"
#define FBSD_METANAME_POST_INSTALL "POST-INSTALL"
#define FBSD_METANAME_PRE_DEINSTALL "DEINSTALL"
#define FBSD_METANAME_POST_DEINSTALL "POST-DEINSTALL"
#define FBSD_METANAME_MTREE "MTREE_DIRS"

/* Meta entry flags.  Max avail. flag is 0x00008000. */
#define FBSD_METACODE_COMMENT 0x00000001
#define FBSD_METACODE_CONTENTS 0x00000002
#define FBSD_METACODE_DESCRIPTION 0x00000004
#define FBSD_METACODE_DISPLAY 0x00000008
#define FBSD_METACODE_REQUIRED_BY 0x00000010
#define FBSD_METACODE_PRE_INSTALL 0x00000020
#define FBSD_METACODE_POST_INSTALL 0x00000040
#define FBSD_METACODE_PRE_DEINSTALL 0x00000080
#define FBSD_METACODE_POST_DEINSTALL 0x00000100
#define FBSD_METACODE_REQUIRE 0x00000200
#define FBSD_METACODE_MTREE 0x00000400

/* Property list entries. */

#define FBSD_NAME "PKGNAME"
#define FBSD_ORIGIN "ORIGIN"
#define FBSD_FORMAT_REVISION "FORMAT_REVISION"
#define FBSD_PRESERVE "PRESERVE"
#define FBSD_EXTRACT_IN_PLACE "EXTRACT_IN_PLACE"

/* File property naming constants. */
#define FBSD_PREFIX "CWD"
#define FBSD_FILE "FILE"
#define FBSD_FILES "FILES"
#define FBSD_HASH "HASH"
#define FBSD_IGNORE "IGNORE"
#define FBSD_PATHNAME "PATHNAME"
#define FBSD_SRCDIR "SRCDIR"

#define FBSD_CONFLICTS "CONFLICTS"
#define FBSD_CONFLICT "CONFLICT"

/* Dependency property naming constants. */
#define FBSD_DEPENDENCIES "DEPENDS"
#define FBSD_DEPENDENCY "DEPENDENCY"

/* Installation commands. */
#define FBSD_EXECS "EXECS"
#define FBSD_EXEC "EXEC"

#define FBSD_UNEXECS "UNEXECS"
#define FBSD_UNEXEC "UNEXEC"

#define FBSD_COMMAND "COMMAND"

#define FBSD_DIRRMS "DIRRMS"
#define FBSD_DIRRM "DIRRM"

/* Required by property naming constants. */
#define FBSD_REQUIRED_BY "REQUIRED_BY"
#define FBSD_REQUIRED_BY_ENTRY "REQBY_ENTRY"

struct parser_writer_vtable *freebsd_plist_parser_writer_vtable(void);

struct meta_entry *freebsd_plist_meta_entry_table(void);

#endif
